home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 4 / MacFormat n. 4 (Spain) / MacFormat 4.bin / Demos / DiscoverIndia Demo / Shiva.dir / 00077.ls < prev    next >
Encoding:
Text File  |  1995-03-31  |  2.4 KB  |  95 lines

  1. on startMovie
  2.   global quitflag, musicFile
  3.   set musicFile to "@:AVFiles:MusicIn.aif"
  4.   set quitflag to 0
  5.   setCsrs()
  6.   when keyDown then checkKey
  7. end
  8.  
  9. on checkKey
  10.   global musicFile
  11.   if the key = "s" then
  12.     if not soundBusy(1) then
  13.       set the volume of sound 1 to 130
  14.       sound playFile 1, musicFile
  15.     else
  16.       if the volume of sound 1 <> 0 then
  17.         set the volume of sound 1 to 0
  18.       else
  19.         set the volume of sound 1 to 130
  20.       end if
  21.     end if
  22.   end if
  23. end
  24.  
  25. on HandPointer
  26.   if rollOver(9) then
  27.     set the castNum of sprite 21 to the number of cast "Pointer"
  28.   else
  29.     set the castNum of sprite 21 to the number of cast "PointerBox"
  30.   end if
  31.   if rollOver(10) then
  32.     set the castNum of sprite 22 to the number of cast "Pointer"
  33.   else
  34.     set the castNum of sprite 22 to the number of cast "PointerBox"
  35.   end if
  36.   if rollOver(11) then
  37.     set the castNum of sprite 23 to the number of cast "Pointer"
  38.   else
  39.     set the castNum of sprite 23 to the number of cast "PointerBox"
  40.   end if
  41.   if rollOver(12) then
  42.     set the castNum of sprite 24 to the number of cast "Pointer"
  43.   else
  44.     set the castNum of sprite 24 to the number of cast "PointerBox"
  45.   end if
  46.   updateStage()
  47. end
  48.  
  49. on HandPointerLeft
  50.   if rollOver(9) then
  51.     set the castNum of sprite 21 to the number of cast "Pointer"
  52.   else
  53.     set the castNum of sprite 21 to the number of cast "PointerBox"
  54.   end if
  55.   if rollOver(10) then
  56.     set the castNum of sprite 22 to the number of cast "PointerLeft"
  57.   else
  58.     set the castNum of sprite 22 to the number of cast "PointerBox"
  59.   end if
  60.   if rollOver(11) then
  61.     set the castNum of sprite 23 to the number of cast "Pointer"
  62.   else
  63.     set the castNum of sprite 23 to the number of cast "PointerBox"
  64.   end if
  65.   if rollOver(12) then
  66.     set the castNum of sprite 24 to the number of cast "PointerLeft"
  67.   else
  68.     set the castNum of sprite 24 to the number of cast "PointerBox"
  69.   end if
  70.   updateStage()
  71. end
  72.  
  73. on quitTest
  74.   global quitflag
  75.   if not rollOver(24) then
  76.     set the castNum of sprite 24 to the number of cast "whitehand"
  77.     puppetSprite(24, 0)
  78.     exit
  79.   end if
  80.   if quitflag = 1 then
  81.     exit
  82.   end if
  83.   puppetSprite(24, 1)
  84.   set the castNum of sprite 24 to the number of cast "Redhand"
  85.   updateStage()
  86.   repeat while rollOver(24)
  87.     if the mouseDown then
  88.       set quitflag to 1
  89.       sound fadeOut 1, 3 * 60
  90.       go(the frame + 1)
  91.       exit repeat
  92.     end if
  93.   end repeat
  94. end
  95.